const path = require('path');
const webpack = require('webpack');
const baseConfig = require('../webpack.base.config.js').getConfig('react');

baseConfig.entry.react = ['react', 'react-dom', 'react-router', path.join(__dirname, './version.js')];
baseConfig.plugins.push(
    new webpack.DllPlugin({
        context: path.resolve(__dirname, '../'), // 官方的例子比较旧，没有这个会出错
        path: path.resolve(__dirname, '../dist/manifest-[name].json'),
        name: '[name]_[hash]'
    })
);

module.exports = baseConfig;
